<template>
  <slot v-if="getUserAuthBtnList"></slot>
</template>

<script setup lang="ts" name="auth">
import { computed } from 'vue'
import { AuthTypes } from '@/utils'
// import { storeToRefs } from 'pinia';
// import { useUserInfo } from '@/stores/userInfo';

// 定义父组件传过来的值
const props = defineProps({
  value: {
    type: String,
    default: () => ''
  }
})

// // 定义变量内容
// const stores = useUserInfo();
// const { userInfos } = storeToRefs(stores);

// 正常是获取 store 中的用户权限
const getUserAuthBtnList = computed(() => {
  return AuthTypes.some((v: string) => v === props.value)
})
</script>
